/*
 * Copyright (C) 2010 TopCoder Inc., All Rights Reserved.
 */
package com.hercules.android.receiver;

import android.view.ViewGroup;

import com.hercules.android.receiver.commands.XRECommandHandler;
import com.hercules.android.receiver.entities.ApplicationConnectionData;
import com.hercules.android.receiver.entities.XREApplicationData;

/**
 * A POJO contains the whole data used by the receiver application.
 * 
 * @author TCSASSEMBER
 * @version 1.0
 */
public class Receiver {
    /**
     * Represents the application data.
     */
    private XREApplicationData applicationData;

    /**
     * Represents the application connection data.
     */
    private ApplicationConnectionData applicationConnectionData;

    /**
     * Represents the root view.
     */
    private ViewGroup appRootView;

    /**
     * Represents the handler to handle command message.
     */
    private XRECommandHandler commandHandler;

    /**
     * Represents the connection manager.
     */
    private ConnectionManager connectionManager;

    /**
     * Default constructor.
     */
    public Receiver() {
    }

    /**
     * Gets the application data.
     * 
     * @return the application data
     */
    public XREApplicationData getApplicationData() {
        return applicationData;
    }

    /**
     * Sets the application data.
     * 
     * @param applicationData
     *            the application data to set
     */
    public void setApplicationData(XREApplicationData applicationData) {
        this.applicationData = applicationData;
    }

    /**
     * Gets the root view.
     * 
     * @return the root view
     */
    public ViewGroup getAppRootView() {
        return appRootView;
    }

    /**
     * Sets the root view.
     * 
     * @param appRootView
     *            the root view to set
     */
    public void setAppRootView(ViewGroup appRootView) {
        this.appRootView = appRootView;
    }

    /**
     * Gets the application connection data.
     * 
     * @return the application connection data
     */
    public ApplicationConnectionData getApplicationConnectionData() {
        return applicationConnectionData;
    }

    /**
     * Set the application connection data.
     * 
     * @param applicationConnectionData
     *            the application connection data to set
     */
    public void setApplicationConnectionData(ApplicationConnectionData applicationConnectionData) {
        this.applicationConnectionData = applicationConnectionData;
    }

    /**
     * Gets the handler to handle command message.
     * 
     * @return the handler to handle command message.
     */
    public XRECommandHandler getCommandHandler() {
        return commandHandler;
    }

    /**
     * Sets the handler to handle command message.
     * 
     * @param commandHandler
     *            the handler to handle command message.
     */
    public void setCommandHandler(XRECommandHandler commandHandler) {
        this.commandHandler = commandHandler;
    }

    /**
     * Gets the connection manager.
     * 
     * @return the connection manager.
     */
    public ConnectionManager getConnectionManager() {
        return connectionManager;
    }

    /**
     * Sets the connection manager.
     * 
     * @param connectionManager
     *            the connection manager to set
     */
    public void setConnectionManager(ConnectionManager connectionManager) {
        this.connectionManager = connectionManager;
    }

}
